<template>
  <button 
    class="fullscreen-toggle" 
    @click="toggleFullscreen"
    :title="isFullscreen ? '退出全屏' : '进入全屏'"
  >
    <span v-if="!isFullscreen">⛶</span>
    <span v-else>⛷</span>
  </button>
</template>

<script setup>
import { useFullscreen } from '@/composables/useFullscreen'

const { isFullscreen, toggleFullscreen } = useFullscreen()
</script>

<style lang="less" scoped>
.fullscreen-toggle {
  position: fixed;
  top: 60px;
  right: 20px;
  z-index: 10000;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  
  &:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
  }
  
  &:active {
    transform: scale(0.95);
  }
}

// 移动端适配
@media (max-width: 768px) {
  .fullscreen-toggle {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
}
</style>
